package org.wkg.lesson06;

public class SingletonLazy03 {
    private volatile static SingletonLazy03 instance;

    public SingletonLazy03() {
        instance = new SingletonLazy03();
    }

    public static SingletonLazy03 getInstance() {
        if (instance == null) {
            synchronized (SingletonLazy03.class) {
                if (instance == null) {
                    instance = new SingletonLazy03();
                }
            }
        }
        return instance;
    }
}